﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Trang quan ly noi dung - Doi mat khau
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="CssJsRef" runat="server">
	<link href="<%= Url.Content("~/Content/css/admin/style.css")%>" rel="stylesheet" type="text/css" />
	<script type="text/javascript" language="javascript">
	    function checkOldPassword() {
	        var pwd1 = document.getElementById('inpOldPassword');
	        var pwd2 = document.getElementById('inpOldPassword2');
	        var errspan = document.getElementById('errOldPassword');
	        if (pwd1.value != pwd2.value)
	            errspan.innerHTML = "Mật khẩu nhập lại không đúng!!!!";
	        else
	            errspan.innerHTML = "";
	    }

	    function checkNewPassword(e) {
	        var errspan = document.getElementById('errNewPassword');
	        if (e.value.length < 6) 
	            errspan.innerHTML = "Mật khẩu tối thiểu phải có 6 ký tự!!!!";
	        else
	            errspan.innerHTML = "";
	    }
	</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="login-content">
        <h2>Đổi mật khẩu</h2>
        <div id="login-main-content" class="wrapper">
            <% using (Html.BeginForm()) { %>
                <p>Mật khẩu cũ</p>
                <p>
                    <input id="inpOldPassword" name="inpOldPassword" type="password" onchange='checkOldPassword()' />
                </p>
                
                <p>Nhập lại mật khẩu cũ</p>
                <p>
                    <input id="inpOldPassword2" name="inpOldPassword2" type="password" onchange='checkOldPassword()' />
                    <span id="errOldPassword" class="error"></span>
                </p>
                
                <p>Mật khẩu mới</p>
                <p>
                    <input id="inpNewPassword" name="inpNewPassword" type="password" onchange='checkNewPassword(this)' />
                    <span id="errNewPassword" class="error"></span>
                </p>
                
                <p>						
                    <input id="btnSave" type="submit" name="btnSubmit" class="button" value="Lưu lại" />
                </p>
                
                <p><span class="error"><%=ViewData["Error"] %></span></p>
            <%} %>        
        </div>
    </div>
</asp:Content>

